package com.jkc.xh.adapters;

import android.view.ViewGroup;

import com.jkc.xh.R;
import com.jkc.xh.adapters.core.BaseRecyclerAdapter;
import com.jkc.xh.adapters.viewholder.AutoItemView;
import com.jkc.xh.adapters.viewholder.AutoItemView_;
import com.jkc.xh.models.AutoModel;

/**
 * 策略列表
 */
public class AutoListAdapter extends BaseRecyclerAdapter<AutoModel, AutoItemView> {

    @Override
    protected AutoItemView onCreateItemView(ViewGroup parent, int viewType) {
        return AutoItemView_.build(parent.getContext());
    }

    @Override
    protected void onBindView(AutoItemView itemView, AutoModel model, int position) {
        itemView.bind(model);
    }

    public void setListener(OnViewClickListener listener) {
        addOnViewClickListener(R.id.btnCancel, listener);
    }

}
